package main.java.com.wen.service;

import com.wen.dao.UserCenterMapper;
import com.wen.entity.UserCenter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 001 on 2017/6/12.
 */
@Service("userCenter")
public class UserCenterServiceImpl implements UserCenterService {

    @Autowired
    UserCenterMapper userCenterMapper;
    @Override
    public UserCenter selectOneUser(Integer id) {
        return userCenterMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<UserCenter> findAllUser() {
        return userCenterMapper.selectAllUserInfo();
    }

    @Override
    public int deleteByPrimaryKey(Integer id){return userCenterMapper.deleteByPrimaryKey(id);}
    @Override
    public int insert(UserCenter record) {
        return userCenterMapper.insert(record);
    }

    @Override
    public int insertSelective(UserCenter record) {
        return userCenterMapper.insertSelective(record);
    }

    @Override
    public UserCenter selectByPrimaryKey(Integer id) {
        return userCenterMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(UserCenter record) {
        return userCenterMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(UserCenter record) {
        return userCenterMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<UserCenter> selectStudentByPage(Integer pageOffset, Integer pageSize) {
        return userCenterMapper.selectStudentByPage(pageOffset,pageSize);
    }

    @Override
    public int allPages() {
        return userCenterMapper.allPages();
    }


}
